﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Habito.Admini.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server"><title>Login</title>
    <style type="text/css">
        .btn { border: 0; background-color: transparent; line-height: 50px; }
    </style>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js">

    </script>
    <script type="text/javascript">
        function login() {
            var name = $("#username").val();
            var pwd = $("#pwd").val();
            $.ajax(
			{
			    cache: false,
			    url: "Login.aspx?IsLogin=1",
			    data: { name: name, pwd: pwd },
			    success: function (data) {
			        if (data == 1) {
			            window.navigate("Index.aspx");
			        }
			        else {
			            alert("Username or password invalid");
			            window.navigate("Login.aspx");
			        }
			    },
			    error: function (data) {
			        alert("Username or password invalid");
			    }
			});
        }
    </script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
    style="text-align: center; margin: auto; background-color: #c6c6c6">
    <form runat="Server" method="">
        <!-- Save for Web Slices (UIDA登录.psd) -->
        <table id="__01" width="524" height="853" border="0" cellpadding="0" cellspacing="0"
            style="margin: auto; margin-top: 100px; text-align: center;">
            <tr>
                <td colspan="5">
                    <img src="../../Content/Images/login/UIDAlogin_01.png" width="524" height="30" alt="">
                </td>
            </tr>
            <tr>
                <td rowspan="4">
                    <img src="../../Content/Images/login/UIDAlogin_02.png" width="52" height="823" alt="">
                </td>
                <td colspan="3">
                    <img src="../../Content/Images/login/UIDAlogin_03.png" width="423" height="45" alt="">
                </td>
                <td rowspan="4">
                    <img src="../../Content/Images/login/UIDAlogin_04.png" width="49" height="823" alt="">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div style="background-image: url('../../Content/Images/login/UIDAlogin_05.png'); background-position: top left; background-repeat: no-repeat; display: block; width: 423px; height: 179px">
                        <input type="text" name="name" runat="Server" id="username" value="" style="margin-top: 35px; margin-left: 40px; border: 0; background-color: #dfdfdf; height: 40px; line-height: 40px; width: 260px;" />
                        <input type="password" runat="Server" name="name" id="pwd" value="" style="margin-top: 24px; margin-left: 40px; border: 0; background-color: #dfdfdf; height: 40px; line-height: 40px; width: 260px;" />
                    </div>
                </td>
            </tr>
            <tr>
                <td rowspan="2">
                    <img src="../../Content/Images/login/UIDAlogin_06.png" width="41" height="599" alt="">
                </td>
                <td>
                    <div style="background-image: url(' ../../Content/Images/login/UIDAlogin_07.png'); background-position: top left; cursor: pointer; background-repeat: no-repeat; width: 341px; line-height: 50px; height: 60px;">
                        <asp:Button Text="Sign Up" runat="server" CssClass="btn" OnClick="Unnamed1_Click" />
                        <%--<a onclick="return login()" style="text-decoration: none; font-family: Verdana; font-size: 11pt;
						display: inline-block; width: 100%; height: 60px; color: Black;" href="Index.aspx">
						Sign Up</a>--%>
                    </div>
                </td>
                <td rowspan="2">
                    <img src="../../Content/Images/login/UIDAlogin_08.png" width="41" height="599" alt="">
                </td>
            </tr>
            <tr>
                <td>
                    <img src="../../Content/Images/login/UIDAlogin_09.png" width="341" height="539" alt="">
                </td>
            </tr>
        </table>
    </form>
    <!-- End Save for Web Slices -->
</body>
</html>
